<script setup lang="ts">
// import { useMessage, noticesData, type ListItem } from "@/layout/components/lay-notice/data";

const columns = [
  {
    label: "勾选列", // 如果需要表格多选，此处label必须设置
    type: "selection",
    fixed: "left",
    reserveSelection: true // 数据刷新后保留选项
  }
];
defineOptions({
  name: "Notice"
});
const { query } = useRoute();
const activeName = ref("1");
const tableRef = ref();
const loading = ref(true);
const dataList = ref([]);
const selectedNum = ref(0);
const pagination = {
  currentPage: 1,
  pageSize: 20,
  total: 0
};
/** 当CheckBox选择项发生变化时会触发该事件 */
function handleSelectionChange(val) {
  selectedNum.value = val.length;
  // 重置表格高度
  tableRef.value.setAdaptive();
}

/** 取消选择 */
function onSelectionCancel() {
  selectedNum.value = 0;
  // 用于多选表格，清空用户的选择
  tableRef.value.getTableRef().clearSelection();
}

function onSearch() {
  loading.value = false;
}
onMounted(() => {
  activeName.value = (query.key as string) ?? "1";
  onSearch();
});
</script>

<template>
  <div class="notice">
    <el-tabs v-model="activeName">
      <el-tab-pane label="通知" name="1" />
      <el-tab-pane label="消息" name="2" />
      <el-tab-pane label="待办" name="3" />
    </el-tabs>
  </div>
  <div class="notice-content">
    <el-card shadow="never">
      <div>123</div>
      <el-badge is-dot />
    </el-card>
  </div>
</template>

<style lang="scss" scoped></style>
